package com.gee.spring.boot.rpf.controller.fico;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import lombok.Data;

import java.io.Serializable;

/**
 * desc:
 *
 * @author gee wrote on  2021-02-04 09:08:33
 */
@Data
public class RequestWrapper implements Serializable {
    private static final long serialVersionUID = 2945695130676811670L;

    private JSONObject request;

    private JSONObject tempVariable = new JSONObject();

    private JSONObject factors = new JSONObject();

    public static RequestWrapper build(Object request){
        RequestWrapper wrapper = new RequestWrapper();
        JSONObject jsonObject = JSONUtil.parseObj(request);
        wrapper.setRequest(jsonObject);
        return wrapper;
    }
}
